Substitution Text Settings
Each FDX function has its own set of variables and variable values that must be defined. These variable values can be hard coded in the rule, or the values can be provided in the Workflow Profile Substitution Text Settings.
You can do this by using the NameValueFormatBuilder. This function defines which of the Workflow Profile Substitution Text fields to use. Using the NameValueFormatBuilder function within your Workflow Profile Substitution Text Settings enables each workflow import's FDX API variable value to have a unique definition. After this function has defined which Text field to use, define which variable values will be referenced using the nvb.NameValuePairs.XFGetValue function.
To use the NameValueFormatBuilder, complete the following steps:
-
Declare the NameValueFormatBuilder and the Workflow Profile Substitution Text field being used.
Example:
Dim nvb As New NameValueFormatBuilder(api.WorkflowProfile.GetAttributeValue (api.ScenarioTypeID, SharedConstants.WorkflowProfileAttributeIndexes.Text4)) -
Declare the variable being defined and have it use the NameValueFormatBuilder variable. In the following example, the CubeViewName variable is being defined.
Example:
Dim cubeViewName As String = nvb.NameValuePairs.XFGetValue ("CubeViewName", String.Empty)CopyPublic Function Main (ByVal si As Session Info, ByVal globals As BRGlobals, ByVal api As Transformer, ByVal args As ConnectorArgs) As Object
Try
Select case args.ActionType
Case Is = Connector ActionTypes.GetFieldList
'Return Field Name List
Dim timeMemfilter As String = "T#2018.Base"
Dim isTimePivot As Boolean = True
Dim useGenericTimeColNames As Boolean = True
Return BRApi.Import.Data.FdxGetCubeVieworDataUnitColumnList(si, timeMemFilter, isTimePivot, useGenericTimeColNames)
Case Is = ConnectorActionTypes.GetData
'Parameter Format for WorkflowProfile Text4
'EntityMF=[E#[Total GolfStream]. Base], ConsName=[Local], ScenarioTypeName=[Actual], ScenarioMF=[S#Actual], TimeMF=[T#2017.Base], ViewName=[YTD], Suppress NoData=[0], Filter=[Account Like '1** or Account Like '2** or Account Like '3** or Account Like '4** or Acco
'Get Parameters stored in Text4
Dim nvb As New NameValueFormatBuilder (api.workflowProfile.GetAttributeValue(api.ScenarioTypeID, SharedConstants.workflowProfileAttributeIndexes.Text4))
Dim cubeName As String = api.CubeName
Dim entityMemFilter As String = nvb.NameValuePairs.XFGetValue("EntityMF", String.Empty)
Dim parentName As String = nvb.NameValuePairs.XFGetValue("ParentName", String.Empty)
Dim consName As String = nvb.NameValuePairs.XFGetValue("ConsName", String.Empty)
Dim scenarioTypeName As String = nvb.NameValuePairs.XFGetValue("ScenarioTypeName", ScenarioType.Actual.Name)
Dim scenarioTypeId As Integer = ScenarioType.GetItem(scenarioTypeName).Id
Dim scenarioMemFilter As String = nvb.NameValuePairs.XFGetValue("ScenarioMF", String.Empty)
Dim timeMemFilter As String = nvb.NameValuePairs.XFGetValue("TimeMF", String.Empty)
Dim viewName As String = nvb.NameValuePairs.XFGetValue("ViewName", String.Empty)
Dim suppressNoData As Boolean = ConvertHelper.ToBoolean (nvb.NameValuePairs.XFGetValue("SuppressNoData", "1"))
Dim useGenericTimeColNames As Boolean = True
Dim filter As String = nvb.NameValuePairs.XFGetValue("Filter", String.Empty)
Dim parallelQueryCount As Integer = 8
Dim logstatistics As Boolean = False
'Process Data
Dim dt As DataTable = BRApi.Import.Data.FdxExecuteDataUnitTimePivot (si, cubeName, entityMemFilter, consName, scenarioTypeId, scenarioMemFilter, timeMemFilter, viewName, suppress NoData, useGenericTimeColNames, filter, parallelQueryCount, logstatistics)
If Not dt Is Nothing Then
api.Parser.ProcessDataTable(si, dt, True, api.ProcessInfo)
Else
BRApi.ErrorLog.LogMessage(si, "FDX DU Params", nvb.GetFormatString())
End If
Return Nothing -
In the Workflow Profile Substitution Text Settings, define the variable in the Text 4 field. Use the syntax Variable=Value in a comma-separated list.
Example: CubeViewName=[NameofCubeView]
Example: CubeViewName=[Example],EntityDimName= [MfgBUEntities],EntityMF=[[E#EUR_MFG].Base],ScenarioDimName=[CorpScenarios],ScenarioMF=[S#Actual],TimeMF= [T#2025].base,Filter=[Unknown]


